//
//  UILabel+SLLinke.h
//  可点击的 Label
//
//  Created by zhusl on 2019/5/16.
//  Copyright © 2019年 com_zhusl. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <CoreText/CoreText.h>
#import "SLLabelLinkeModel.h"

@protocol SLLabelLinkeDelegate <NSObject>

@optional

- (void) sl_labelLinkeClicked:(NSString *)string withIndex:(NSInteger)index withRange:(NSRange)range;

@end


@interface UILabel (SLLinke)

@property (strong,nonatomic) NSMutableArray <SLLabelLinkeModel * >* linkeRangs;


@property (weak, nonatomic) id <SLLabelLinkeDelegate> sl_linkeDelegate;

- (void)addlinkeString:(NSString *)string withRange:(NSRange)range;

- (void)addlinkeString:(NSString *)string;

- (CFIndex)characterIndexAtPoint:(CGPoint)p;

@end

